﻿//04. Write a program to convert hexadecimal numbers to their decimal representation.

using System;

namespace HexadecimalToDecimal
{
    class HexadecimalToDecimal
    {
        static void Main()
        {
            Console.Write("Enter a hexadecimal number: ");
            string hexNumber = Console.ReadLine();
            string[] hexNumberSplit = hexNumber.Split();

            foreach (String hex in hexNumberSplit)
            {
                int value = Convert.ToInt32(hex, 16);
                Console.WriteLine("Hexadecimal value = {0}, int value = {1}.", hex, value);
            }
        }
    }
}
